/**
 * Copyright ©2003~2019年10月6日 szkingdom
 * @author raohj
 * @date 2019年10月6日
 * @file RClassStruct.java
 * @comment : please input your comment to this file
 * @version : input version
 * @modify:
 * 		1、 2019年10月6日 由 raohj 新建文件
 */
package com.ccnu.demojava.jvm.classparse;

/**
 * @author raohj
 * @date 2019年10月6日
 * @version 
 * @comment to add your comment
 * 参考JDK13的官方文档
 * ClassFile {
    u4             magic;
    u2             minor_version;
    u2             major_version;
    u2             constant_pool_count;
    cp_info        constant_pool[constant_pool_count-1];
    u2             access_flags;
    u2             this_class;
    u2             super_class;
    u2             interfaces_count;
    u2             interfaces[interfaces_count];
    u2             fields_count;
    field_info     fields[fields_count];
    u2             methods_count;
    method_info    methods[methods_count];
    u2             attributes_count;
    attribute_info attributes[attributes_count];
}
 */
public class RClassStruct {
	public byte[] magic = new byte[4];
	public short minor_version;
	public short major_version;
	public short constant_pool_count;	// 常量池数量
	public RCS_cp_info[] constant_pool;	// 常量池数组
	public byte[] access_flags = new byte[2];
	public short this_class = 0;	// 指向constant_pool
	public short super_class = 0;	// 指向constant_pool
	public short interface_count;
	public short[] interfaces;
	public short fields_count;
	public RCS_field_info[] fields;
	public short methods_count;
	public RCS_method_info[] methods;
	public short attributes_count;
	public RCS_attribute_info[] attributes = null;
}
